$(function(){
    var SubMit = document.querySelector('.SubMit');
    var modle1 = document.querySelector('.Model1');
    SubMit.index = true;
    SubMit.addEventListener('click', function() {
        if (SubMit.index) {
            modle1.className = 'Model Model1 Model-active'
            SubMit.index = !SubMit.index
        } else {
            return false
        }
    })
    modle1.addEventListener('click', function() {
        if (!SubMit.index) {
            modle1.className = 'Model Model1'
            SubMit.index = !SubMit.index
            // window.location.reload();
        } else {
            return false
        }
    })
    // SubMit.click();
    $('.use-integral').click(function(e){
    	e.stopPropagation();
    	location.href=getRootPath()+'/GasHome/Goods/Index?park_id='+$('#park_id').val();
    });
    $('.model-answer').click(function(e){
    	e.stopPropagation();
    	$('.Model1').click();
    	showAnswer();
    });
})


function showQuestion(){
    $('.zhezhao').show();
    $('.question-iframe').animate({top:'0px'},500);
}

function showAnswer(){
    $('.zhezhao').show();
    $('.answer-iframe').animate({top:'0px'},500);
}


function showResult(right_count,get_integral){
	$('.right-count').html(right_count);
	$('.get-integral').html(get_integral);
	$('.SubMit').click();
}

